﻿@model PasswordRecoveryModel
@using Grand.Web.Models.Customer;
@inject IPageHeadBuilder pagebuilder
@{
    Layout = "_ColumnsOneClean";

    //title
    pagebuilder.AddTitleParts(T("PageTitle.PasswordRecovery").Text);
}
<div class="page password-recovery-page">
    <div class="mb-2 w-100">
        <div class="row flex-md-row justify-content-center text-center my-3">
            <div class="col-sm-8 col-12">
                <div class="card p-3 bg-light">
                    <span class="generalTitle h3">@T("Account.PasswordRecovery")</span>
                    @if (!String.IsNullOrEmpty(Model.Result))
                    {
                        <div class="result">
                            <div class="result card bg-info p-3 text-white">@Model.Result</div>
                        </div>
                    }
                    @if (!Model.Send)
                    {
                        <form asp-route="PasswordRecovery" method="post">
                            <input type="hidden" asp-for="DisplayCaptcha" />
                            <div asp-validation-summary="ModelOnly" class="message-error"></div>
                            <div class="form-group">
                                <label asp-for="Email" class="col-form-label">@T("Account.PasswordRecovery.Email"):</label>
                                <input asp-for="Email" class="form-control email" />
                                <span asp-validation-for="Email"></span>
                            </div>
                            @if (Model.DisplayCaptcha)
                            {
                                <div class="form-group">
                                    <div class="captcha-box">
                                        <captcha />
                                    </div>
                                </div>
                            }
                            <div class="row text-xs-center">
                                <div class="col-12">
                                    <input type="submit" name="send-email" class="btn btn-secondary password-recovery-button" value="@T("Account.PasswordRecovery.RecoverButton")" />
                                </div>
                            </div>

                            <div class="tooltip card text-white card-danger text-xs-center">
                                <div class="card-body">
                                    <blockquote class="card-bodyquote">
                                        <p>@T("Account.PasswordRecovery.Tooltip")</p>
                                    </blockquote>
                                </div>
                            </div>
                        </form>
                    }
                </div>
            </div>
        </div>
    </div>
</div>